
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>
<?php
function filled_out($form_vars)
{
	//test that each variable has data
	foreach($form_vars as $key => $value)
	{
		if((!isset($key))||($value ==''))
		{
			return false;
		}
	}
	return true;
}
function valid_email($address)
{
	//check an email addres is possibly valid
	if(ereg('^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$',$address))
	{
		return true;
	}
	else
	{
		return false;
	}
}
?>
</body>
</html>